<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>快餐店点餐系统</title>
    <style>
        body {
            font-family: "Arial", sans-serif;
            background-color: #e8f5e9;
            color: #333;
            margin: 0;
            padding: 0;
        }

        .navbar {
            background-color: #81c784;
            color: white;
            padding: 15px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .navbar div {
            font-size: 18px;
            font-weight: bold;
        }

        .navbar a {
            color: white;
            text-decoration: none;
            font-size: 14px;
            margin: 0 10px;
            padding: 8px 12px;
            border-radius: 4px;
            transition: background-color 0.3s;
        }

        .navbar a:hover {
            background-color: #66bb6a;
        }

        .hero {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 50px 20px;
        }

        .hero h1 {
            color: #388e3c;
            font-size: 36px;
            margin-bottom: 20px;
        }

        .hero p {
            font-size: 16px;
            color: #555;
        }

        .card-container {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            margin: 40px auto;
            gap: 20px;
            max-width: 1000px;
        }

        .card {
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            padding: 20px;
            width: 300px;
            text-align: center;
            transition: transform 0.3s, box-shadow 0.3s;
        }

        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        }

        .card h2 {
            color: #388e3c;
            font-size: 20px;
            margin-bottom: 10px;
        }

        .card p {
            color: #555;
            font-size: 14px;
        }

        @media screen and (max-width: 768px) {
            .navbar {
                flex-direction: column;
                align-items: flex-start;
            }

            .card {
                width: 100%;
                max-width: 90%;
            }
        }
    </style>
</head>
<body>
<!-- 顶部导航栏 -->
<div class="navbar">
    <div>快餐店点餐系统</div>
    <div>
        <c:choose>
            <c:when test="${sessionScope.role == '2'}">
                <a href="admin.jsp">后台管理</a>
            </c:when>
        </c:choose>
        <c:choose>
            <c:when test="${empty sessionScope.username}">
                <a href="login.jsp">登录</a>
                <a href="register.jsp">注册</a>
            </c:when>
            <c:otherwise>
                <a href="userindex.jsp">个人中心</a>
                <a href="logout.jsp">退出</a>
            </c:otherwise>
        </c:choose>
    </div>
</div>

<!-- 主体内容 -->
<div class="hero">
    <h1>欢迎来到快餐店点餐系统</h1>
    <p>体验便捷点餐，尽享美食时光！</p>
</div>

<!-- 卡片内容 -->
<div class="card-container">
    <div class="card">
        <h2>快速点餐</h2>
        <p>轻松选择您喜欢的美味，快速下单！</p>
    </div>
    <div class="card">
        <h2>每日推荐</h2>
        <p>发现我们为您精心挑选的每日特色餐品。</p>
    </div>
    <div class="card">
        <h2>优惠活动</h2>
        <p>参与优惠活动，享受更多折扣福利。</p>
    </div>
</div>
</body>
</html>
